<template>
	<view class="u-p-20">
		<w-list :list='list' :status='status'>
			<template>
				<view v-for="(item,index) in list" :key="index">
					<w-notice-list :item='item'></w-notice-list>
				</view>
			</template>
		</w-list>
	</view>
</template>

<script>
	import {
		getArticleList
	} from '@/api/index.js'
	export default {
		data() {
			return {
				list:[],
				pageNo:1,
				status:'loadmore'
			}
		},
		onLoad() {
			this.getArticleList()
		},
		onPullDownRefresh() {
			this.list = []
			this.pageNo = 1
			this.getArticleList()
		},
		onReachBottom() {
			this.status='loading'
			this.pageNo++
			this.getArticleList()
		},
		methods: {
			getArticleList(){
				getArticleList({type:3,pageNo:this.pageNo,pageSize:10}).then(res=>{
					const arr = res.list
					if(arr.length==10){
						this.status = 'loadmore'
					}else{
						this.status = 'nomore'
					}
					this.list = this.list.concat(arr)
				})
			},
		}
	}
</script>

<style>

</style>
